<template>
  <!-- <WorkflowLayout /> -->
  <div>
    <span style="font-size: 16px" @click="doShowWin()">点击弹窗</span>
  </div>
</template>

<script>
  import { defineComponent } from 'vue';
  /* import WorkflowLayout from './layout/index.vue'; */
  import { showWorkFlowWin } from '@/hooks/util';
  import { useMicroStore } from '@common/store/micro-store';
  export default defineComponent({
    name: 'Workflow',
    components: {
      /* WorkflowLayout, */
    },
    setup() {
      const doShowWin = () => {
        showWorkFlowWin({ workflowId: '' }, () => {});
      };
      // 获取子应用store
      const microStore = useMicroStore();

      // 注册事件
      microStore.on('workflow-init', ({ workflowId, funcData }, fn) => {
        // ...业务逻辑
        showWorkFlowWin({ workflowId, funcData }, fn);
      });

      return { doShowWin };
    },
  });
</script>
